


clear 
set scheme lean2, permanent
global pm = char(177)
set more off

gl date = c(current_date)
if c(os) == "MacOSX" gl user "/Users/`c(username)'"
else if c(os) == "Windows" gl user "C:\Users\\`c(username)'"
else if c(os) == "Unix" gl user "/usr/`c(username)'"
di "$user

set graphics on  


global path_data_processed "\data\processed"
global path_output "\data\output"

clear all
set more off

cd "$path_data_processed"
use "experimentRNall.dta", clear
 
 
 
 cd "$path_output"
 
  set scheme lean2

gen updatingmain = posterior - prior
 gen updatingmain_f = posterior_f - prior


***** I) prior and posterior beliefs about receccsion*****

hist updatingmain if treatment==0, xtitle("Updating: Treatment 5 %") bin(20)
graph save "updating_5.gph", replace
hist updatingmain if treatment==1, xtitle("Updating: Treatment 35 %") bin(20)
graph save "updating_35.gph", replace

hist updatingmain_f if treatment==0, xtitle("Updating (follow-up): Treatment 5 %") bin(20)
graph save "updating_followup_5.gph", replace
hist updatingmain_f if treatment==1, xtitle("Updating (follow-up): Treatment 35 %") bin(20)
graph save "updating_followup_35.gph", replace

graph combine "updating_5.gph" "updating_35.gph" "updating_followup_5.gph" "updating_followup_35.gph", xcommon ycommon col(2)
graph export "updatingrecession.pdf", replace








